﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Clipper.Converters
{
    public class ReagentColorConverter : AbstractConverters
    {
        public override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            //switch (value.ToString())
            //{
            //    case "0":
            //        return "";
            //    default:
            //        return "/Clipper;component/Skin/Icon/反应条进样仓状态.png";
            //}
            if (value != null)
            {
                int times = int.Parse(value.ToString());
                if (times > 0)
                {
                    return "Black";
                }
                else
                {
                    return "Red";
                }
            }
            else
            {
                return null;
            }
        }
    }
}
